/*
 * @(#)TablesConfigService.java   1.0  2021年11月24日
 * 
 * Copyright (c)	2014-2020. All Rights Reserved.	GuangZhou hhmk Technology Company LTD.
 */
package com.swift.dts.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.swift.core.auth.Login;
import com.swift.core.model.ServiceRequest;
import com.swift.core.model.data.DataModel;
import com.swift.core.model.data.MapDataModel;
import com.swift.core.service.SynInterface;
import com.swift.dts.loadconfig.FileTablesConfig;

/**
 * 添加说明 
 * @author zhengjiajin
 * @version 1.0 2021年11月24日
 */
@Service("tablesConfigList")
@Login
public class TablesConfigList implements SynInterface {

    @Autowired
    private FileTablesConfig fileTablesConfig;
    /** 
     * @see com.swift.core.service.SynInterface#doService(com.swift.core.model.ServiceRequest)
     */
    @Override
    public DataModel doService(ServiceRequest req) {
        DataModel res = new MapDataModel();
        Map<?,?> map = fileTablesConfig.loadMap();
        res.addObject("synTable", map.get("synTable"));
        res.addObject("blackFilter", map.get("blackFilter"));
        res.addObject("onlyDdlFilter", map.get("onlyDdlFilter"));
        res.addObject("tableNameChange", map.get("tableNameChange"));
        return res;
    }
}
